package com.isatechindonesia.pilihsaya;

import com.markupartist.android.widget.ActionBar;
import com.mobile.pilihsaya.DBClass;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MenuUtamaActivity extends Activity{

	DBClass db = new DBClass(this);
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_menu_utama);
		
		ActionBar actionBar = (ActionBar) findViewById(R.id.actionbar_post);
		actionBar.setTitle("Menu Utama");
		
		Button btnLogout = (Button)findViewById(R.id.btnLogout);
		
		btnLogout.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				//db.deleteRelawan();
				Intent i = new Intent(getApplicationContext(),
						LoginActivity.class);
				//finish();
				db.deleteRelawan();
				startActivity(i);
				
			}
		});
		
	}

}
